Skip to content

Semibold table headers; heading copy button next to the title - #40

Merged
b451c merged 6 commits into
mainfrom
integrate/headers
Oct 22, 2026
Merged

b451c merged 6 commits into
mainfrom
integrate/headers

Conversation

@b451c

@b451c b451c commented Oct 22, 2026

Copy link
Copy Markdown
Owner

CI gate for local commits on main; main will be fast-forwarded to this branch once CI is green.

  • Table headers are semibold (TableTextBuilder.raiseToHeaderWeight): the table view always asked for it, but the renderer's explicit run fonts won and headers drew regular. Weight only goes up (bold stays bold, italic and monospaced keep their face; a family without semibold falls back to bold through a descriptor, safe off-main). Attributes only, so search and copy are unchanged.
  • The heading's copy-section button sits right after the title text again (since 1.11 it was at the column's right edge): still an overlay, offset by the title's widest laid-out line (pure function in BlockLayout.Heading, cached per title/level/scale/fonts and width), arrow cursor over the icon.

Local: 756 tests, Release + Release-APPSTORE; reviewed; E2E on a separate build (button position for H1-H6, wrapped heading, zoom; title drag-select; copy click; cursor).

b451c and others added 6 commits October 22, 2026 14:59
The table view always asked for a semibold header, but the renderer's
explicit run fonts won and headers drew regular. TableTextBuilder now raises
header runs to semibold (weight only goes up: bold stays bold, italic and
monospaced keep their face; a family without semibold falls back to its
bold through a descriptor, safe off-main). Attributes only, so search and
copy read the same characters, and the measurer lays out the same string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since v1.11 (headings became NSTextView-backed) the hover-to-copy button sat
at the column's right edge, far from short headings. It is still an overlay
(no HStack sibling of the representable), now offset by the title's widest
laid-out line + the 1.10 spacing, clamped to the row: a pure function in
BlockLayout.Heading of the same string the title shows, cached per
(content version, level, scale, fonts, title, width). Row height and the
title's wrap width are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The copy button's offset cache converted the heading string again for
every new wrap width, so a live-resize step cost a conversion plus a
layout per visible heading. The converted title is now cached once per
layout key and only the used width per wrap width: a resize step is one
TextKit layout.

The key (BlockLayout.Heading.titleLayoutKey) holds only what decides the
width - title, level, zoom, document fonts. contentVersion is gone, so a
reload, a Source Edit save or a theme switch no longer misses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The button now lies on the title's text view, so its I-beam showed over
the icon. Re-set the arrow on every move over the button (the text view
updates its cursor on mouse moves too). Checked on a build: arrow over the
icon, I-beam over the title text, the click still copies the section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@b451c
b451c merged commit a38fc34 into main Oct 22, 2026
3 checks passed
@b451c
b451c deleted the integrate/headers branch October 22, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant